
SRC_DIR = ./          # 存放.s文件的目录
BIN_DIR = ./          # 输出.bin文件的目录
SOURCES = $(wildcard $(SRC_DIR)/*.s)  # 获取所有.s文件
#TARGETS = #$(patsubst $(SRC_DIR)/%.s,$(BIN_DIR)/%.bin,$(SOURCES))  # 生成目标文件名

TARGETS = recursive.bin  rax.bin func

all: $(TARGETS)

func:
	gcc -g src/func.c -o bin/func

%.bin: src/%.s
	mkdir -p bin
	#@echo "Compiling source file: $$<"
	#@echo "Compiling source file: $$TARGETS"
	gcc -g $< -o bin/$@	


clean:
	rm -rf rec
	rm -rf *bin
	
